{"ast":null,"code":"import _classCallCheck from \"@babel/runtime/helpers/esm/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/esm/createClass\";\nimport _inherits from \"@babel/runtime/helpers/esm/inherits\";\nimport _createSuper from \"@babel/runtime/helpers/esm/createSuper\";\nimport CloseCircleFilled from \"@ant-design/icons/es/icons/CloseCircleFilled\";\nimport classNames from 'classnames';\nimport * as React from 'react';\nimport { FormItemInputContext } from '../form/context';\nimport { cloneElement } from '../_util/reactNode';\nimport { getMergedStatus, getStatusClassNames } from '../_util/statusUtils';\nconst ClearableInputType = ['text', 'input'];\nfunction hasAddon(props) {\n  return !!(props.addonBefore || props.addonAfter);\n}\nlet ClearableLabeledInput = /*#__PURE__*/function (_React$Component) {\n  _inherits(ClearableLabeledInput, _React$Component);\n  var _super = _createSuper(ClearableLabeledInput);\n  function ClearableLabeledInput() {\n    _classCallCheck(this, ClearableLabeledInput);\n    return _super.apply(this, arguments);\n  }\n  _createClass(ClearableLabeledInput, [{\n    key: \"renderClearIcon\",\n    value: function renderClearIcon(prefixCls) {\n      const {\n        value,\n        disabled,\n        readOnly,\n        handleReset,\n        suffix\n      } = this.props;\n      const needClear = !disabled && !readOnly && value;\n      const className = `${prefixCls}-clear-icon`;\n      return /*#__PURE__*/React.createElement(CloseCircleFilled, {\n        onClick: handleReset,\n        // Do not trigger onBlur when clear input\n        // https://github.com/ant-design/ant-design/issues/31200\n        onMouseDown: e => e.preventDefault(),\n        className: classNames({\n          [`${className}-hidden`]: !needClear,\n          [`${className}-has-suffix`]: !!suffix\n        }, className),\n        role: \"button\"\n      });\n    }\n  }, {\n    key: \"renderTextAreaWithClearIcon\",\n    value: function renderTextAreaWithClearIcon(prefixCls, element, statusContext) {\n      const {\n        value,\n        allowClear,\n        className,\n        style,\n        direction,\n        bordered,\n        hidden,\n        status: customStatus,\n        hashId\n      } = this.props;\n      const {\n        status: contextStatus,\n        hasFeedback\n      } = statusContext;\n      if (!allowClear) {\n        return cloneElement(element, {\n          value\n        });\n      }\n      const affixWrapperCls = classNames(`${prefixCls}-affix-wrapper`, `${prefixCls}-affix-wrapper-textarea-with-clear-btn`, getStatusClassNames(`${prefixCls}-affix-wrapper`, getMergedStatus(contextStatus, customStatus), hasFeedback), {\n        [`${prefixCls}-affix-wrapper-rtl`]: direction === 'rtl',\n        [`${prefixCls}-affix-wrapper-borderless`]: !bordered,\n        // className will go to addon wrapper\n        [`${className}`]: !hasAddon(this.props) && className\n      }, hashId);\n      return /*#__PURE__*/React.createElement(\"span\", {\n        className: affixWrapperCls,\n        style: style,\n        hidden: hidden\n      }, cloneElement(element, {\n        style: null,\n        value\n      }), this.renderClearIcon(prefixCls));\n    }\n  }, {\n    key: \"render\",\n    value: function render() {\n      return /*#__PURE__*/React.createElement(FormItemInputContext.Consumer, null, statusContext => {\n        const {\n          prefixCls,\n          inputType,\n          element\n        } = this.props;\n        if (inputType === ClearableInputType[0]) {\n          return this.renderTextAreaWithClearIcon(prefixCls, element, statusContext);\n        }\n      });\n    }\n  }]);\n  return ClearableLabeledInput;\n}(React.Component);\nexport default ClearableLabeledInput;","map":{"version":3,"names":["_classCallCheck","_createClass","_inherits","_createSuper","CloseCircleFilled","classNames","React","FormItemInputContext","cloneElement","getMergedStatus","getStatusClassNames","ClearableInputType","hasAddon","props","addonBefore","addonAfter","ClearableLabeledInput","_React$Component","_super","apply","arguments","key","value","renderClearIcon","prefixCls","disabled","readOnly","handleReset","suffix","needClear","className","createElement","onClick","onMouseDown","e","preventDefault","role","renderTextAreaWithClearIcon","element","statusContext","allowClear","style","direction","bordered","hidden","status","customStatus","hashId","contextStatus","hasFeedback","affixWrapperCls","render","Consumer","inputType","Component"],"sources":["/data/messenger.client/node_modules/antd/es/input/ClearableLabeledInput.js"],"sourcesContent":["import _classCallCheck from \"@babel/runtime/helpers/esm/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/esm/createClass\";\nimport _inherits from \"@babel/runtime/helpers/esm/inherits\";\nimport _createSuper from \"@babel/runtime/helpers/esm/createSuper\";\nimport CloseCircleFilled from \"@ant-design/icons/es/icons/CloseCircleFilled\";\nimport classNames from 'classnames';\nimport * as React from 'react';\nimport { FormItemInputContext } from '../form/context';\nimport { cloneElement } from '../_util/reactNode';\nimport { getMergedStatus, getStatusClassNames } from '../_util/statusUtils';\nconst ClearableInputType = ['text', 'input'];\nfunction hasAddon(props) {\n  return !!(props.addonBefore || props.addonAfter);\n}\nlet ClearableLabeledInput = /*#__PURE__*/function (_React$Component) {\n  _inherits(ClearableLabeledInput, _React$Component);\n  var _super = _createSuper(ClearableLabeledInput);\n  function ClearableLabeledInput() {\n    _classCallCheck(this, ClearableLabeledInput);\n    return _super.apply(this, arguments);\n  }\n  _createClass(ClearableLabeledInput, [{\n    key: \"renderClearIcon\",\n    value: function renderClearIcon(prefixCls) {\n      const {\n        value,\n        disabled,\n        readOnly,\n        handleReset,\n        suffix\n      } = this.props;\n      const needClear = !disabled && !readOnly && value;\n      const className = `${prefixCls}-clear-icon`;\n      return /*#__PURE__*/React.createElement(CloseCircleFilled, {\n        onClick: handleReset,\n        // Do not trigger onBlur when clear input\n        // https://github.com/ant-design/ant-design/issues/31200\n        onMouseDown: e => e.preventDefault(),\n        className: classNames({\n          [`${className}-hidden`]: !needClear,\n          [`${className}-has-suffix`]: !!suffix\n        }, className),\n        role: \"button\"\n      });\n    }\n  }, {\n    key: \"renderTextAreaWithClearIcon\",\n    value: function renderTextAreaWithClearIcon(prefixCls, element, statusContext) {\n      const {\n        value,\n        allowClear,\n        className,\n        style,\n        direction,\n        bordered,\n        hidden,\n        status: customStatus,\n        hashId\n      } = this.props;\n      const {\n        status: contextStatus,\n        hasFeedback\n      } = statusContext;\n      if (!allowClear) {\n        return cloneElement(element, {\n          value\n        });\n      }\n      const affixWrapperCls = classNames(`${prefixCls}-affix-wrapper`, `${prefixCls}-affix-wrapper-textarea-with-clear-btn`, getStatusClassNames(`${prefixCls}-affix-wrapper`, getMergedStatus(contextStatus, customStatus), hasFeedback), {\n        [`${prefixCls}-affix-wrapper-rtl`]: direction === 'rtl',\n        [`${prefixCls}-affix-wrapper-borderless`]: !bordered,\n        // className will go to addon wrapper\n        [`${className}`]: !hasAddon(this.props) && className\n      }, hashId);\n      return /*#__PURE__*/React.createElement(\"span\", {\n        className: affixWrapperCls,\n        style: style,\n        hidden: hidden\n      }, cloneElement(element, {\n        style: null,\n        value\n      }), this.renderClearIcon(prefixCls));\n    }\n  }, {\n    key: \"render\",\n    value: function render() {\n      return /*#__PURE__*/React.createElement(FormItemInputContext.Consumer, null, statusContext => {\n        const {\n          prefixCls,\n          inputType,\n          element\n        } = this.props;\n        if (inputType === ClearableInputType[0]) {\n          return this.renderTextAreaWithClearIcon(prefixCls, element, statusContext);\n        }\n      });\n    }\n  }]);\n  return ClearableLabeledInput;\n}(React.Component);\nexport default ClearableLabeledInput;"],"mappings":"AAAA,OAAOA,eAAe,MAAM,2CAA2C;AACvE,OAAOC,YAAY,MAAM,wCAAwC;AACjE,OAAOC,SAAS,MAAM,qCAAqC;AAC3D,OAAOC,YAAY,MAAM,wCAAwC;AACjE,OAAOC,iBAAiB,MAAM,8CAA8C;AAC5E,OAAOC,UAAU,MAAM,YAAY;AACnC,OAAO,KAAKC,KAAK,MAAM,OAAO;AAC9B,SAASC,oBAAoB,QAAQ,iBAAiB;AACtD,SAASC,YAAY,QAAQ,oBAAoB;AACjD,SAASC,eAAe,EAAEC,mBAAmB,QAAQ,sBAAsB;AAC3E,MAAMC,kBAAkB,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC;AAC5C,SAASC,QAAQ,CAACC,KAAK,EAAE;EACvB,OAAO,CAAC,EAAEA,KAAK,CAACC,WAAW,IAAID,KAAK,CAACE,UAAU,CAAC;AAClD;AACA,IAAIC,qBAAqB,GAAG,aAAa,UAAUC,gBAAgB,EAAE;EACnEf,SAAS,CAACc,qBAAqB,EAAEC,gBAAgB,CAAC;EAClD,IAAIC,MAAM,GAAGf,YAAY,CAACa,qBAAqB,CAAC;EAChD,SAASA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